﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Idp_Login.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

namespace Idp_Login.Controllers
{
    [Authorize]
    public class IdentityController : Controller
    {

        private readonly ILogger<IdentityController> _logger;

        public IdentityController(ILogger<IdentityController> logger)
        {
            _logger = logger;
        }

        public IActionResult Login()
        {
            var obj = new { a = "a" };
            return new JsonResult(obj);

        }

        public IActionResult Get()
        {
            var obj = from c in User.Claims select new { c.Type, c.Value };
            return new JsonResult(obj);
        }
    }
}
